-
-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add length option for shorten_path
#886
feat: Add length option for shorten_path
#886
Conversation
2 Things:
Otherwise yes cool idea thanks :) |
@Conni2461 I don't really know what happened with #473 either - I ended up taking a bit of a break as well. If I'm not mistaken, it was before TJ refactored actions so there's likely some work to be done before we can merge it. |
fyi #839 is merged. This PR is unblocked. This would be a nice change :) |
I think we're also still waiting on #473 before this PR can proceed. |
Yeah i haven't received an answer. Hmm i am thinking of just finishing it. I think anott03 is a little bit frustrated with me. I haven't done the best job of helping with that PR. If i have a evening of free time next week, i will spend it on 473. I dont wanna block stuff that is actually super cool :) |
@l-kershaw apologies for blocking you so long with #473! It's merged now so this should be good to go (I think Conni had some minor fixes he wanted to make – just double check that those are done). Let me know if you ever want help or feedback with this! |
be738ba
to
c2c32ee
Compare
@anott03 no worries at all! Developer time is a scarce resource in open source projects, and I appreciate all of the time you spent on #473 🙂 I've reimplemented the Does anyone have any thoughts on better ways to implement this option? |
I'll back at my desk later tonight and I'll see if I can come up with any ideas then :) |
For interface i have 2 thoughts. Also I would prefer len to be always a number, so we dont need |
Thoughts on both interface ideas? You can also always ask tj if you are stuck, he will then make the decision 😆 |
@Conni2461 I don't really like either of your suggested configuration methods, they both feel weird to me (not that my method is any better, mind you). There seem to be two contradictory goals with configuring this:
I'm not sure what to do, since these goals don't seem compatible and I don't really know which one to sacrifice in favour of the other. @tjdevries do you have any thoughts on this? Regarding the change to |
A quick project wide search for |
We will keep the shorthand for now because we dont wanna break extensions, we can deprecate it later :) In hindsight this Also we had a discussion here #961 where i said |
- adds option to configure the length of shortened parts of filenames - only affects paths when "shorten" is in `path_display` - reimplemented based on changes in nvim-telescope#473 and nvim-telescope#839
skip-checks: true
- also deprecates `utils.path_shorten` and passes straight to `plenary`s `Path:shorten` [docgen] Update doc/telescope.txt skip-checks: true
bfc9475
to
f8f267e
Compare
@Conni2461 I think that your I don't think there's a better way to deal with this option, so I'm happy to just keep it like this. @Conni2461 @anott03 is there anything else you think I should change? |
WIP
Adding option to provide a length for
shorten_path
, not just a boolean, as suggested in #880.Implemented using
Path:shorten
from plenary as the function in telescope had gotten out of date in comparison.Todo:
Feedback welcome 🙂